/****** Object:  Stored Procedure dbo.spr_InsertDBDrivers  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_InsertDBDrivers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_InsertDBDrivers]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_InsertDBDrivers]
 (
	@compid int,
	@dob datetime,
	@driverid int,
	@drivername varchar(50),
	@fathername varchar(50),
	@hourperweek int,
	@is3rdparty bit,
	@isactive bit,
	@licexpiry smalldatetime,
	@licid varchar(20),
	@licpointsleft tinyint,
	@nicno varchar(20),
	@passportno varchar(25),
	@visaexpiry smalldatetime,
	@visaid varchar(20),
	@wageperhour decimal(6,
 2)
 )
 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	INSERT INTO [Drivers]
	(
		[CompId],
		[DOB],
		[DriverId],
		[DriverName],
		[FatherName],
		[HourPerWeek],
		[Is3rdParty],
		[IsActive],
		[LicExpiry],
		[LicId],
		[LicPointsLeft],
		[NICNo],
		[PassportNo],
		[VisaExpiry],
		[VisaId],
		[WagePerHour]
	)
	VALUES
	(
		@compid,
		@dob,
		@driverid,
		@drivername,
		@fathername,
		@hourperweek,
		@is3rdparty,
		@isactive,
		@licexpiry,
		@licid,
		@licpointsleft,
		@nicno,
		@passportno,
		@visaexpiry,
		@visaid,
		@wageperhour
	)

	SET @Err = @@Error
	RETURN @Err
 END

 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

